home *** CD-ROM | disk | FTP | other *** search
/ Animator / Animator (Catchers).iso / Acrobat / Reader / AcroRd32.exe / PSPROCSET / 15 < prev    next >
Text File  |  1999-03-18  |  10KB  |  619 lines

  1. %%BeginResource: makeocf.prc
  2. %%Copyright: Copyright 1987-1998 Adobe Systems Incorporated. All Rights Reserved.
  3. PDFText begin
  4. PDF /PDFMakeOCF 25 dict dup begin put
  5. /CIDFONT_MAX_STRING_SIZE 8000 def
  6. /_mkocfString100 100 string def
  7. /pdf_BuildCharDict 15 dict dup begin
  8. /dst_string 1500 string def
  9. /nullstring () def
  10. end def
  11. /pdf_raise {exch cvx exch errordict exch get exec stop} bind def
  12. /pdf_reraise
  13. { cvx $error /errorname get (Error: ) print dup (                    ) cvs print
  14. errordict exch get exec stop
  15. } bind def
  16. /pdf_cvnsi
  17. {
  18. 1 index add 1 sub 1 exch 0 4 1 roll
  19. {
  20. 2 index exch get
  21. exch 8 bitshift
  22. add
  23. }
  24. for
  25. exch pop
  26. } bind def
  27. /pdf_GetInterval
  28. {
  29. pdf_BuildCharDict begin
  30. /dst_index 0 def
  31. dup /dst_string length gt
  32. {dup string /dst_string exch def}
  33. if
  34. 1 index CIDFONT_MAX_STRING_SIZE idiv
  35. /arrayIndex exch def
  36. 2 index arrayIndex get
  37. 2 index
  38. arrayIndex CIDFONT_MAX_STRING_SIZE mul
  39. sub
  40. {
  41. dup 3 index add 2 index length le
  42. {
  43. 2 index getinterval
  44. dst_string dst_index 2 index putinterval
  45. length dst_index add /dst_index exch def
  46. exit
  47. }
  48. {
  49. 1 index length 1 index sub
  50. dup 4 1 roll
  51. getinterval
  52. dst_string dst_index 2 index putinterval
  53. pop dup dst_index add /dst_index exch def
  54. sub
  55. /arrayIndex arrayIndex 1 add def
  56. 2 index dup length arrayIndex gt
  57. {
  58. arrayIndex get
  59. }
  60. {
  61. pop
  62. exit
  63. }
  64. ifelse
  65. 0
  66. }
  67. ifelse
  68. } loop
  69. pop pop pop
  70. dst_string 0 dst_index getinterval
  71. end
  72. } bind def
  73. Level2?
  74. {
  75. /CIDFont /Category resourcestatus
  76. { pop pop }
  77. {
  78. currentglobal true setglobal
  79. /Generic /Category findresource
  80. dup length dict copy
  81. dup /InstanceType /dicttype put
  82. /CIDFont exch /Category defineresource pop
  83. setglobal
  84. } ifelse
  85. pdf_has_composefont?
  86. {
  87. /CIDInit /ProcSet findresource begin
  88. 12 dict begin
  89. begincmap
  90. /CIDSystemInfo 3 dict dup begin
  91. /Registry (Adobe) def
  92. /Ordering (Identity) def
  93. /Supplement 0 def
  94. end def
  95. /CMapName /pdf_Identity def
  96. /CMapVersion 1.000 def
  97. /CMapType 1 def
  98. 1 begincodespacerange
  99. <0000> <FFFF>
  100. endcodespacerange
  101. 1 begincidrange
  102. <0000> <FFFF> 0
  103. endcidrange
  104. endcmap
  105. CMapName currentdict /CMap defineresource pop
  106. end
  107. end
  108. %%EndResource
  109. %%EOF
  110. }
  111. if
  112. }
  113. {
  114. /pdf_Category 2 dict begin
  115. /CIDFont 10 dict def
  116. /ProcSet 2 dict def
  117. currentdict
  118. end
  119. def
  120. /defineresource
  121. {
  122. pdf_Category 1 index 2 copy known
  123. {
  124. get
  125. 3 index 3 index put
  126. pop exch pop
  127. }
  128. {
  129. pop pop
  130. /defineresource /undefined pdf_raise
  131. }
  132. ifelse
  133. } bind def
  134. /findresource
  135. {
  136. pdf_Category 1 index 2 copy known
  137. {
  138. get
  139. 2 index 2 copy known
  140. { get 3 1 roll pop pop}
  141. { pop pop /findresource /undefinedresource pdf_raise }
  142. ifelse
  143. }
  144. {
  145. pop pop
  146. /findresource /undefined pdf_raise
  147. }
  148. ifelse
  149. } bind def
  150. /resourcestatus
  151. {
  152. pdf_Category 1 index 2 copy known
  153. {
  154. get
  155. 2 index known
  156. exch pop exch pop
  157. {
  158. 0 -1 true
  159. }
  160. {
  161. false
  162. }
  163. ifelse
  164. }
  165. {
  166. pop pop
  167. /findresource /undefined pdf_raise
  168. }
  169. ifelse
  170. } bind def
  171. }
  172. ifelse
  173. /pdf_CIDInit 2 dict begin
  174. /pdf_cidfont_stream_init
  175. {
  176. {
  177. dup (Binary) eq
  178. {
  179. pop
  180. null
  181. currentfile
  182. Level2?
  183. {
  184. { cid_BYTE_COUNT () /SubFileDecode filter }
  185. stopped
  186. { pop pop pop }
  187. if
  188. }
  189. if
  190. /readstring load
  191. exit
  192. }
  193. if
  194. dup (Hex) eq
  195. {
  196. pop
  197. currentfile
  198. Level2?
  199. {
  200. { null exch /ASCIIHexDecode filter /readstring }
  201. }
  202. stopped
  203. { pop exch pop (>) exch /readhexstring }
  204. if
  205. { (>) exch /readhexstring }
  206. ifelse
  207. load
  208. exit
  209. }
  210. if
  211. /StartData /typecheck pdf_raise
  212. }
  213. loop
  214. cid_BYTE_COUNT CIDFONT_MAX_STRING_SIZE le
  215. {
  216. 2 copy cid_BYTE_COUNT string exch exec
  217. pop
  218. 1 array dup
  219. 3 -1 roll
  220. 0 exch put
  221. }
  222. {
  223. cid_BYTE_COUNT CIDFONT_MAX_STRING_SIZE div ceiling cvi
  224. dup array exch 2 sub 0 exch 1 exch
  225. {
  226. 2 copy
  227. 5 index
  228. CIDFONT_MAX_STRING_SIZE
  229. string
  230. 6 index exec
  231. pop
  232. put
  233. pop
  234. }
  235. for
  236. 2 index
  237. cid_BYTE_COUNT CIDFONT_MAX_STRING_SIZE mod string
  238. 3 index exec
  239. pop
  240. 1 index exch
  241. 1 index length 1 sub
  242. exch put
  243. }
  244. ifelse
  245. cid_CIDFONT exch /GlyphData exch put
  246. 2 index null eq
  247. {
  248. pop pop pop
  249. }
  250. {
  251. pop /readstring load
  252. 1 string exch
  253. {
  254. 3 copy exec
  255. pop
  256. dup length 0 eq
  257. {
  258. pop pop pop pop pop
  259. true exit
  260. }
  261. if
  262. 4 index
  263. eq
  264. {
  265. pop pop pop pop
  266. false exit
  267. }
  268. if
  269. }
  270. loop
  271. pop
  272. }
  273. ifelse
  274. } bind def
  275. /StartData
  276. {
  277. mark
  278. {
  279. currentdict
  280. dup /CDevProc known not
  281. {
  282. /CDevProc
  283. 1183615869 internaldict /stdCDevProc 2 copy known
  284. { get }
  285. {
  286. pop pop
  287. {pop pop pop pop pop 0 -1000 7 index 2 div 880 }
  288. }
  289. ifelse
  290. def
  291. } if
  292. /cid_temp 15 dict def
  293. cid_temp
  294. begin
  295. /cid_CIDFONT exch def
  296. 3 copy pop
  297. dup /cid_BYTE_COUNT exch def 0 gt
  298. {
  299. pdf_cidfont_stream_init
  300. FDArray
  301. {
  302. /Private get
  303. dup /SubrMapOffset known
  304. {
  305. begin
  306. /Subrs SubrCount array def
  307. Subrs
  308. SubrMapOffset
  309. SubrCount
  310. SDBytes
  311. Level2?
  312. {
  313. currentdict dup /SubrMapOffset undef
  314. dup /SubrCount undef
  315. /SDBytes undef
  316. }
  317. if
  318. end
  319. /cid_SD_BYTES exch def
  320. /cid_SUBR_COUNT exch def
  321. /cid_SUBR_MAP_OFFSET exch def
  322. /cid_SUBRS exch def
  323. cid_SUBR_COUNT 0 gt
  324. {
  325. GlyphData cid_SUBR_MAP_OFFSET cid_SD_BYTES pdf_GetInterval
  326. 0 cid_SD_BYTES pdf_cvnsi
  327. 0 1 cid_SUBR_COUNT 1 sub
  328. {
  329. exch 1 index
  330. 1 add
  331. cid_SD_BYTES mul cid_SUBR_MAP_OFFSET add
  332. GlyphData exch cid_SD_BYTES pdf_GetInterval
  333. 0 cid_SD_BYTES pdf_cvnsi
  334. cid_SUBRS 4 2 roll
  335. GlyphData exch
  336. 4 index
  337. 1 index
  338. sub
  339. pdf_GetInterval
  340. dup length string copy put
  341. }
  342. for
  343. pop
  344. }
  345. if
  346. }
  347. { pop }
  348. ifelse
  349. }
  350. forall
  351. }
  352. if
  353. cleartomark pop pop
  354. end
  355. CIDFontName currentdict /CIDFont
  356. defineresource pop
  357. end end
  358. }
  359. stopped
  360. { cleartomark /StartData pdf_reraise }
  361. if
  362. } bind def
  363. currentdict
  364. end
  365. def
  366. /pdf_saveCIDInit
  367. {
  368. /CIDInit /ProcSet resourcestatus
  369. { true }
  370. { /CIDInitC /ProcSet resourcestatus }
  371. ifelse
  372. {
  373. pop pop
  374. /CIDInit /ProcSet findresource
  375. pdf_has_composefont?
  376. { pop null}
  377. {
  378. /CIDInit pdf_CIDInit /ProcSet defineresource pop
  379. } ifelse
  380. }
  381. {
  382. /CIDInit pdf_CIDInit /ProcSet defineresource pop
  383. null
  384. }
  385. ifelse
  386. PDFVars exch /_pdf_oldCIDInit exch put
  387. } bind def
  388. /pdf_restoreCIDInit
  389. {
  390. PDFVars /_pdf_oldCIDInit get null ne
  391. {
  392. /CIDInit _pdf_oldCIDInit /ProcSet defineresource
  393. }
  394. if
  395. } bind def
  396. /pdf_BuildCharVM
  397. {
  398. %% set up vm state
  399. {
  400. PDFMakeOCF begin
  401. 1 index begin
  402. CIDFont begin
  403. pdf_BuildCharDict begin
  404. /pdf_dfCharCode exch def
  405. /pdf_dfDict exch def
  406. CIDFirstByte pdf_dfCharCode add
  407. dup CIDCount ge
  408. { pop 0 }
  409. if
  410. /cid exch def
  411. {
  412. /cidMapOffset cid GDBytes FDBytes add mul CIDMapOffset add def
  413. /cidMapNextOffset cidMapOffset GDBytes add FDBytes add def
  414. GlyphData cidMapOffset FDBytes GDBytes add pdf_GetInterval
  415. dup
  416. FDBytes 0 ne
  417. { 0 FDBytes pdf_cvnsi }
  418. { 0 }
  419. ifelse
  420. /fdIndex exch def
  421. FDBytes GDBytes pdf_cvnsi
  422. /charStringOffset exch def
  423. GlyphData cidMapNextOffset FDBytes GDBytes add pdf_GetInterval
  424. FDBytes GDBytes pdf_cvnsi
  425. charStringOffset sub
  426. /charStringLength exch def
  427. charStringLength 0 ne
  428. {
  429. GlyphData charStringOffset charStringLength pdf_GetInterval
  430. /charstring exch def
  431. exit
  432. }
  433. {
  434. cid 0 eq
  435. {
  436. /charstring nullstring def
  437. exit
  438. }
  439. if
  440. /cid 0 def
  441. }
  442. ifelse
  443. }
  444. loop
  445. pdf_dfDict pdf_dfCharCode charstring
  446. FDArray fdIndex get
  447. /Private get
  448. Level2? not
  449. {
  450. pdf_dfDict /Private
  451. 3 -1 roll
  452. { put } 1183615869 internaldict /superexec get exec
  453. }
  454. if
  455. 1183615869 internaldict
  456. Level2?
  457. { 1 index }
  458. { 3 index /Private get }
  459. ifelse
  460. dup /RunInt known
  461. { /RunInt get }
  462. { pop /CCRun }
  463. ifelse
  464. get exec
  465. }
  466. stopped
  467. { stop }
  468. if
  469. end
  470. end
  471. end
  472. end
  473. %% Restore VM state
  474. } def
  475. /BaseFontNameStr (BF00) def
  476. /BaseFontTemplate 8 dict begin
  477. /FontType 4 def
  478. /FontMatrix [0.001 0 0 0.001 0 0] def
  479. /FontBBox [-250 -250 1250 1250] def
  480. /Encoding cHexEncoding def
  481. /PaintType 0 def
  482. /BuildChar /pdf_BuildCharVM load def
  483. /Private 1 dict dup /lenIV -1 put def
  484. /CharStrings 1 dict dup /.notdef <8B FA 8E 0D 0F> put def
  485. currentdict
  486. end def
  487. /BaseFontDictSize BaseFontTemplate length 5 add def
  488. /pdf_makeocf
  489. {
  490. 11 dict begin
  491. exch /FontName exch def
  492. /FontType 0 def
  493. /FontMatrix matrix def
  494. /FMapType 2 def
  495. /bfCount 1 index /CIDCount get 1 sub 256 idiv 1 add def
  496. /Encoding 256 array def
  497. 0 1 255 { Encoding exch dup dup bfCount ge { pop bfCount } if put } for
  498. /FDepVector bfCount 1 add array def
  499. BaseFontTemplate BaseFontDictSize dict copy
  500. begin
  501. /CIDFont exch def
  502. CIDFont /FontBBox known
  503. {
  504. CIDFont /FontBBox get
  505. /FontBBox exch def
  506. }
  507. if
  508. /CDevProc CIDFont /CDevProc get def
  509. currentdict
  510. end
  511. BaseFontNameStr 3 48 put